package com.jcl.recruit.elasticsearch.resume.dao;

import com.jcl.core.constants.Constant;
import com.jcl.core.db.DatabaseContext;
import com.jcl.recruit.elasticsearch.mapper.ConsoleSearchResumeMapper;
import com.jcl.recruit.elasticsearch.resume.model.ConsoleSearchResume;
import com.jcl.recruit.elasticsearch.resume.vo.ElasticPageCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName ConsoleSearchResumeDao
 * @Author yyliu
 * @Date 2018/12/25 13:21
 * @Version 1.0
 **/
@Component
public class ConsoleSearchResumeDao implements ConsoleSearchResumeMapper {

    @Autowired
    private ConsoleSearchResumeMapper consoleSearchResumeMapper;

    @Override
    public List<ConsoleSearchResume> findList(ElasticPageCondition condition) {
        DatabaseContext.setServerName(Constant.ELASTIC_DB_NAME);
        return consoleSearchResumeMapper.findList(condition);
    }
}
